package com.deanlib.cabinet.ui.view.search;

import android.view.KeyEvent;
import android.widget.TextView;

import com.deanlib.cabinet.R;
import com.deanlib.cabinet.base.BaseFragment;
import com.deanlib.cabinet.databinding.FragmentSearchBinding;

/**
 * Created by Dean on 2022/8/16
 */
public class SearchFragment extends BaseFragment<FragmentSearchBinding> {
    @Override
    public void initView() {
        binding.etSearch.setOnEditorActionListener(new TextView.OnEditorActionListener() {
            @Override
            public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
                if (actionId==KeyEvent.KEYCODE_SEARCH){
                    //todo 搜索
                    return true;
                }
                return false;
            }
        });
    }

    @Override
    public void loadData() {

    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_search;
    }
}
